package org.example.mapper;


import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.model.User;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper {
//    Page<User> list(Page<User>);

    List<User> listAll();

    List<User> list(int current,int size);
    User findById(Integer id);
    Boolean insert(User user);
    Boolean delById(Integer id);
    Boolean updateById(User user);
    List<User> selectList(int current,int size,@Param("username") String username,@Param("age") Integer age);
    void deleteByIds(List<Integer> ids);
    int insertList(List<User> users);
    void exportUsersToExcel(List<User> userlist, HttpServletResponse response);
    void uploadImg(@Param("id") Integer id,@Param("avatar") String avatar);

    User findByName(String name);
    String findPswByName(String username);
}
